<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript">
        // var 函数名 = function(形参列表) { 函数体 }

        var fun =  function (){
            alert("无参函数被调用");
        }

        fun();

        var fun1 = function (a , b) {
            alert("有参函数方法被调用a=  " + a + "b=" + b);
        }

        fun1(10,"QWQ");

        var fun2 = function (a,b){
            var sum = a+b;
            return sum;
        }

        alert(fun2(1000,300));
    </script>
</head>
<body>

</body>
</html>